<?php
$con = mysql_connect("localhost","root","root");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("dinocap2", $con);
$dateTime = date("Y-m-d",strtotime("-1 day"));

mysql_query("DELETE FROM dinocap2hd WHERE whatday < '2012-03-15' or whatday >'$dateTime'");

mysql_close($con);
?>